From f32c3d5ad792dd2e3a3572fcd20b921dfe4fbc65 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Fri, 23 Aug 2013 04:19:39 +0000 Subject: [PATCH] Delete some dead code. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4558 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.cc | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/gpsbabel/util.cc b/gpsbabel/util.cc index cd20a1bde..a02b9498d 100644 --- a/gpsbabel/util.cc +++ b/gpsbabel/util.cc @@ -174,34 +174,6 @@ xstrndup(const char* str, size_t sz) return newstr; } -/* - * Lazily trim whitespace (though not from allocated version) - * while copying. - */ -char* -#ifdef DEBUG_MEM -XSTRNDUPT(const char* str, size_t sz, DEBUG_PARAMS) -#else -xstrndupt(const char* str, size_t sz) -#endif -{ - size_t newlen = 0; - char* cin = (char*)str; - char* newstr; - - while ((newlen < sz) && (*cin != '\0')) { - newlen++; - cin++; - } - - newstr = (char*) xmalloc(newlen + 1); - memcpy(newstr, str, newlen); - newstr[newlen] = 0; - rtrim(newstr); - - return newstr; -} - void* #ifdef DEBUG_MEM XREALLOC(void* p, size_t s, DEBUG_PARAMS) @@ -1188,21 +1160,6 @@ gstrsub(const char* s, const char* search, const char* replace) return o; } -/* - * Like strstr, but starts from back of string. - */ -const char* -xstrrstr(const char* s1, const char* s2) -{ - const char* r = NULL, *next = NULL; - - while (next = strstr(s1, s2), NULL != next) { - r = next; - s1 = next + 1; - } - return r; -} - /* * */ -- 2.30.2